﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Runtime.Serialization;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace bdnt_pets_system_Entity
{
    public class SimpleObject<T1, T2> : INotifyPropertyChanged
    {
        public T1 Item1 { get; set; }
        public T2 Item2 { get; set; }

        public event PropertyChangedEventHandler PropertyChanged;
        public virtual void OnPropertyChanged(string propertyName)
        {
            System.ComponentModel.PropertyChangedEventHandler handler = this.PropertyChanged;
            if (handler != null)
            {
                var e = new System.ComponentModel.PropertyChangedEventArgs(propertyName);
                handler(this, e);
            }
        }

    }

    public class SimpleObject<T1, T2, T3> : INotifyPropertyChanged
    {
        public T1 Item1 { get; set; }
        public T2 Item2 { get; set; }
        T3 item3;
        public T3 Item3
        {
            get
            {
                return item3;
            }
            set
            {
                if (!value.Equals(item3))
                    this.OnPropertyChanged("Item3");
                item3 = value;
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        public virtual void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
          
        }

    }
}
